﻿ define(["service/service", "service/httpService"], function (service) {
    service.factory("tokenShopSubjectService", function (httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/admin/tokenShopSubject/gets", params);
            },
            get: function (params) {
                return httpService.get("/admin/tokenShopSubject/get", params);
            },
            "update": function (params) {
                return httpService.upload("/admin/tokenShopSubject/update", params);
            },
            "add": function (params) {
                return httpService.upload("/admin/tokenShopSubject/add", params);
            },
            "delete": function (id) {
                return httpService.delete("/admin/tokenShopSubject/delete/" + id);
            },
            "updateStatus": function (id, status) {
                return httpService.post("/admin/tokenShopSubject/updateStatus", { id: id, status: status });
            },
            "getproducts": function (params) {
                return httpService.get("/admin/tokenShopSubject/GetProducts", params);
            },
            "getsubjectproducts": function (params) {
                return httpService.get("/admin/tokenShopSubject/GetSubjectProducts", params);
            },
            "addproducts": function (params) {
                return httpService.post("/admin/tokenShopSubject/AddProducts", params);
            },
            "deleteproduct": function (id) {
                return httpService.get("/admin/tokenShopSubject/DeleteProduct/" + id);
            },
            "altersort": function (params) {
                return httpService.post("/admin/tokenShopSubject/AlterSort", params);
            }
        }
        return methods;
    });
});